<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>DAP_config.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="proglogo"><img alt="CMSIS Logo" src="CMSIS_Logo_Final.png"></td>
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-DAP
   &#160;<span id="projectnumber">Version - Preview</span>
   </div>
   <div id="projectbrief">CMSIS Interface to CoreSight Debug Access Port</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
<!--
	<li><a href="../../General/html/index.html"><span>CMSIS</span></a></li>
      <li><a href="../../Core/html/index.html"><span>CORE</span></a></li>
      <li><a href="../../DSP/html/index.html"><span>DSP</span></a></li>
      <li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li>
      <li><a href="../../SVD/html/index.html"><span>SVD</span></a></li>
-->	  
      <li class="current"><a href="../../DAP/html/index.html"><span>DAP</span></a></li>
    </ul>
</div>
<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_d_a_p__config_8c.html','');
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">DAP_config.c</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**************************************************************************/</span>
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef __DAP_CONFIG_H__</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __DAP_CONFIG_H__</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="comment">//#include &quot;device.h&quot;                   // DAP Hardware Device Header File</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 
<a name="l00031"></a>00031 <span class="preprocessor">#define DAP_VENDOR              &quot;ARM&quot;</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define DAP_PRODUCT             &quot;CMSIS-DAP&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define DAP_SER_NUM             &quot;00000000&quot;</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define DAP_FW_VER              &quot;0.0&quot;</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a>00036 <span class="preprocessor">#define DAP_PACKET_SIZE         1024    // Maximum Request/Response packet size  </span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define DAP_PACKET_COUNT        4       // Maximum number of buffered packets </span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="preprocessor">#define DAP_JTAG_DEV_CNT        8       // Maximum number of JTAG devices</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 
<a name="l00047"></a>00047 <span class="keyword">static</span> __inline <span class="keywordtype">void</span> PORT_JTAG_SETUP (<span class="keywordtype">void</span>) {
<a name="l00048"></a>00048   ;
<a name="l00049"></a>00049 }
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 
<a name="l00057"></a>00057 <span class="keyword">static</span> __inline <span class="keywordtype">void</span> PORT_SWD_SETUP (<span class="keywordtype">void</span>) {
<a name="l00058"></a>00058   ;
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060 
<a name="l00064"></a>00064 <span class="keyword">static</span> __inline <span class="keywordtype">void</span> PORT_SWJ_OFF (<span class="keywordtype">void</span>) {
<a name="l00065"></a>00065 
<a name="l00066"></a>00066 }
<a name="l00067"></a>00067 
<a name="l00068"></a>00068 
<a name="l00080"></a>00080 <span class="keyword">static</span> __forceinline uint32_t PIN_SWCLK_TCK_IN  (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00081"></a>00081 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_SWCLK_TCK_SET (<span class="keywordtype">void</span>) {}
<a name="l00082"></a>00082 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_SWCLK_TCK_CLR (<span class="keywordtype">void</span>) {}
<a name="l00083"></a>00083 
<a name="l00085"></a>00085 <span class="keyword">static</span> __forceinline uint32_t PIN_SWDIO_TMS_IN  (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00086"></a>00086 <span class="keyword">static</span> __forceinline uint32_t PIN_SWDIO_IN      (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00087"></a>00087 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_SWDIO_OUT     (uint32_t bit) {}
<a name="l00088"></a>00088 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_SWDIO_TMS_SET (<span class="keywordtype">void</span>) {}
<a name="l00089"></a>00089 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_SWDIO_TMS_CLR (<span class="keywordtype">void</span>) {}
<a name="l00090"></a>00090 
<a name="l00092"></a>00092 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_SWDIO_OUT_ENABLE  (<span class="keywordtype">void</span>) {}
<a name="l00093"></a>00093 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_SWDIO_OUT_DISABLE (<span class="keywordtype">void</span>) {}
<a name="l00094"></a>00094 
<a name="l00096"></a>00096 <span class="keyword">static</span> __forceinline uint32_t PIN_TDI_IN  (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00097"></a>00097 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_TDI_OUT (uint32_t bit) {}
<a name="l00098"></a>00098 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_TDI_SET (<span class="keywordtype">void</span>) {}
<a name="l00099"></a>00099 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_TDI_CLR (<span class="keywordtype">void</span>) {}
<a name="l00100"></a>00100 
<a name="l00102"></a>00102 <span class="keyword">static</span> __forceinline uint32_t PIN_TDO_IN  (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00103"></a>00103 
<a name="l00105"></a>00105 <span class="keyword">static</span> __forceinline uint32_t PIN_nTRST_IN   (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00106"></a>00106 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_nTRST_OUT  (uint32_t bit) {}
<a name="l00107"></a>00107 
<a name="l00109"></a>00109 <span class="keyword">static</span> __forceinline uint32_t PIN_nRESET_IN  (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00110"></a>00110 <span class="keyword">static</span> __forceinline <span class="keywordtype">void</span>     PIN_nRESET_OUT (uint32_t bit) {}
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 
<a name="l00113"></a>00113 
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 <span class="comment">// Debug Unit LEDs</span>
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 <span class="comment">// Debug Unit: Connected LED</span>
<a name="l00118"></a>00118 <span class="keyword">static</span> __inline uint32_t LED_CONNECTED_IN  (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00119"></a>00119 <span class="keyword">static</span> __inline <span class="keywordtype">void</span>     LED_CONNECTED_OUT (uint32_t bit) {}
<a name="l00120"></a>00120 
<a name="l00121"></a>00121 <span class="comment">// Debug Unit: Target Running LED</span>
<a name="l00122"></a>00122 <span class="keyword">static</span> __inline uint32_t LED_RUNNING_IN  (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00123"></a>00123 <span class="keyword">static</span> __inline <span class="keywordtype">void</span>     LED_RUNNING_OUT (uint32_t bit) {}
<a name="l00124"></a>00124 
<a name="l00125"></a>00125 
<a name="l00126"></a>00126 <span class="comment">// Parameters for JTAG/SWD Speed</span>
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 <span class="preprocessor">#define CPU_CLOCK               100000000</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span>
<a name="l00130"></a>00130 <span class="preprocessor">#define IO_PORT_WRITE_CYCLES    2       // Number of cycles for I/O Port Write</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define IO_PORT_READ_CYCLES     2       // Number of cycles for I/O Port Read</span>
<a name="l00132"></a>00132 <span class="preprocessor"></span>
<a name="l00133"></a>00133 <span class="comment">// Configurable delay for clock generation</span>
<a name="l00134"></a>00134 <span class="preprocessor">#define DELAY_SLOW_CYCLES       3       // Number of cycles for one iteration</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="keyword">static</span> __forceinline <span class="keywordtype">void</span> PIN_DELAY_SLOW (uint32_t delay) {
<a name="l00136"></a>00136   <span class="keyword">volatile</span> int32_t count;
<a name="l00137"></a>00137 
<a name="l00138"></a>00138   count = delay;
<a name="l00139"></a>00139   <span class="keywordflow">while</span> (--count);
<a name="l00140"></a>00140 }
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 <span class="comment">// Fixed delay for fast clock generation</span>
<a name="l00143"></a>00143 <span class="preprocessor">#define DELAY_FAST_CYCLES       0       // Number of cycles</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="keyword">static</span> __forceinline <span class="keywordtype">void</span> PIN_DELAY_FAST (<span class="keywordtype">void</span>) {
<a name="l00145"></a>00145 <span class="comment">//__nop();</span>
<a name="l00146"></a>00146 }
<a name="l00147"></a>00147 
<a name="l00148"></a>00148 
<a name="l00149"></a>00149 <span class="comment">// Timer Functions</span>
<a name="l00150"></a>00150 
<a name="l00151"></a>00151 <span class="comment">// Start Timer</span>
<a name="l00152"></a>00152 <span class="keyword">static</span> __inline <span class="keywordtype">void</span> TIMER_START (uint32_t usec) {}
<a name="l00153"></a>00153 
<a name="l00154"></a>00154 <span class="comment">// Stop Timer</span>
<a name="l00155"></a>00155 <span class="keyword">static</span> __inline <span class="keywordtype">void</span> TIMER_STOP (<span class="keywordtype">void</span>) {}
<a name="l00156"></a>00156 
<a name="l00157"></a>00157 <span class="comment">// Check if Timer expired</span>
<a name="l00158"></a>00158 <span class="keyword">static</span> __inline uint32_t TIMER_EXPIRED (<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> (0); }
<a name="l00159"></a>00159 
<a name="l00160"></a>00160 
<a name="l00161"></a>00161 <span class="comment">// Debug Unit: Device specific setup (called when application starts)</span>
<a name="l00162"></a>00162 <span class="keyword">static</span> __inline <span class="keywordtype">void</span> DAP_SETUP (<span class="keywordtype">void</span>) {}
<a name="l00163"></a>00163 
<a name="l00164"></a>00164 
<a name="l00165"></a>00165 <span class="preprocessor">#endif </span><span class="comment">/* __DAP_CONFIG_H__ */</span>
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>DAP_config.c</b>      </li>

    <li class="footer">Generated on Tue May 15 2012 12:10:24 for CMSIS-DAP by ARM Ltd. All rights reserved.
    <!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li>
    -->
    </li>
   </ul>
 </div>


</body>
</html>
